package com.rhm.dataStructure.Leetcode;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 0:03
 * @Description:
 **/

import java.util.Scanner;

/*
leetcode 9 判断是否为回文数
 */
public class Code9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int n = sc.nextInt();
            System.out.println(huiwen(n));
        }

    }
  public static boolean huiwen(int x){
      if(x==0){
          return true;
      }
      if(x<0||x%10==0){
          return false;
      }
      int a =x;
      int rev =0;
      while (a!=0){
          int pop = a%10;
          a = a/10;
          rev = rev*10+pop;
      }
      return x==rev ;
  }
}
